Modern electronic appliances are often capable of being controlled remotely. For example, they are supplied with a remote control which allows the user to enter commands, which are then sent to the device by, for example, infrared (IR) signals. As the number of such appliances increases, users are faced with a plurality of remote controls. This is inconvenient, because it is difficult to keep track of where each of the remote controls is located, and which remote control belongs to which device. Moreover, each remote control has a different lay-out which has to be learned and remembered by the user. To solve this problem, universal remote controls are known, for example from U.S. Pat. No. 4,623,887, which store IR codes for a large number of devices and allow the user to control all those devices by a single remote control. For that purpose, the universal remote control has a large number of buttons to enable the user to select an appliance to be controlled and to control the specific functions of all individual appliances. To control a particular device, the user has to select an appliance, aim at it with the remote control and operate the buttons which are suitable for controlling the device. It is further known to provide a universal remote control with learning which allow IR codes of a new appliances to be learned, so that the new device can subsequently be controlled with the universal remote control. IR codes for a specific appliance are entered into a universal remote control by placing the universal remote control and the remote control of the appliance face to face. Generally, the universal remote control must be set to a learning mode and repetitively a key of the universal remote control is selected and a corresponding key of the other remote control is pressed, causing a command code to be transmitted to the universal remote control and associated with the selected key. A disadvantage of this method is that the remote control of the appliance has to be present and operational. This is often not the case, e.g. if a user lost its old universal remote control and now wants to put a new one into use, the remote controls of the various appliances may not be present anymore or their batteries may be empty.